using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class web_Controls_ctrl_san_ds : System.Web.UI.UserControl
{
    Common comm = new Common();
    public DataTable dtt_sapdienra;
    public DataTable dtt_dangdienra;
    public DataTable dtt_hoanthanh;
    public SanGDVL sanComm = new SanGDVL();
    protected void Page_Load(object sender, EventArgs e)
    {
        string sql = "SELECT * FROM sangiaodich "
                    +" inner join TrungTamViecLam on TrungTamViecLam.ma_trung_tam = sangiaodich.ma_trung_tam "
                    +" WHERE ngay_dien_ra > getdate() and kich_hoat =1 ";
        dtt_sapdienra = comm.getDataTable(sql);

               sql = "SELECT * FROM sangiaodich "
                    + " inner join TrungTamViecLam on TrungTamViecLam.ma_trung_tam = sangiaodich.ma_trung_tam "
                    + " WHERE ngay_dien_ra <= getdate() and kich_hoat =1 ";
        dtt_dangdienra = comm.getDataTable(sql);
                sql = "SELECT * FROM sangiaodich "
                    + " inner join TrungTamViecLam on TrungTamViecLam.ma_trung_tam = sangiaodich.ma_trung_tam "
                    + " WHERE ngay_dien_ra <= getdate() and kich_hoat =0 ";
        dtt_hoanthanh = comm.getDataTable(sql);

    }
}
